#include <stdio.h>

int main()
{
    char ch1 = -1;
    signed char ch2 = -1;
    unsigned char ch3 = 1;
    char ch4 = 'a';

    short sh1 = -2;
    signed short sh2 = -2;
    unsigned short sh3 = 2;

    int in1 = -3;
    signed int in2 = -3;
    unsigned int in3 = 3;

    long l1 = -4;
    signed long l2 = -4;
    unsigned long l3 = 4;

    float f1 = 0.5;
    float f2 = -0.5;

    double d1 = 0.6;
    double d2 = -0.6;

    printf("字符型：ch4 = %c, ch1 = %d, ch2 = %d, ch3 = %u\n", ch4, ch1, ch2, ch3);
    printf("短整型：sh1 = %d, sh2 = %d, sh3 = %u\n", sh1, sh2, sh3);
    printf("整型：in1 = %d, in2 = %d, in3 = %u\n", in1, in2, in3);
    printf("长整型：l1 = %ld, l2 = %ld, l3 = %lu\n", l1, l2, l3);
    printf("单精度浮点型：f1 = %f, f2 = %f\n", f1, f2);
    printf("双精度浮点型：d1 = %lf, d2 = %lf\n", d1, d2);

    printf("=====>分割线<=====\n");

    printf("字符型占用字节数：%lu\n", sizeof(char));
    printf("短整型占用字节数：%lu\n", sizeof(short));
    printf("整形占用字节数：%lu\n", sizeof(int));
    printf("长整形占用字节数：%lu\n", sizeof(long));
    printf("单精度浮点型占用字节数：%lu\n", sizeof(float));
    printf("双精度浮点型占用字节数：%lu\n", sizeof(double));
    printf("无符号类型占用字节数：%lu\n", sizeof(void));


    return 0;
}
